<script lang="ts" setup name="NotFoundRe">
import router from '@/router';
import { useTabsViewStore } from '@/index';
import { storeToRefs } from 'pinia';
import { onBeforeRouteLeave } from 'vue-router';
const { tabList } = storeToRefs(useTabsViewStore());
const handleReturn = () => {
  router.go(-1);
  tabList.value = tabList.value.filter(item => item.name != 'NotFoundRe');
};

onBeforeRouteLeave(() => {
  tabList.value = tabList.value.filter(item => item.name != 'NotFoundRe');
});
</script>
<template>
  对不起，您访问的网页不存在，请点击
  <el-button link @click="handleReturn">返回</el-button>
  上一网页。
</template>
<style lang="scss" scoped></style>
